package com.situ.web.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.situ.web.entity.User;

@WebServlet("/course")
public class CourseController extends HttpServlet {

	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		req.setCharacterEncoding("utf-8");

		// 先判断session里面有没有user这个对象
//		HttpSession session = req.getSession();
//		User user = (User) session.getAttribute("user");
//		if (user == null) {
//			// 用户根本没有登录,重定向到登录界面
//			resp.sendRedirect(req.getContextPath() + "/user_login.jsp");
//			return;
//		}
		
		
	}
}
